package com.tycmc.signelectroniccontracts.ui.listview;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ListView;

/**
 *自动添加高度的ListView
 */
public class CustomeListView extends ListView {
    public CustomeListView(Context context) {
        this(context,null);
    }

    public CustomeListView(Context context, AttributeSet attrs) {
        this(context, attrs,0);
    }

    public CustomeListView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }
    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        // TODO Auto-generated method stub
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);
    }
}
